{extend name="wap/default/base" /}
{block name="resources"}
<link rel="stylesheet" type="text/css" href="__TEMP__/{$style}/public/css/control_type.css">
<link rel="stylesheet" type="text/css" href="__TEMP__/{$style}/public/css/goods_list.css">
<link rel="stylesheet" type="text/css" href="__TEMP__/{$style}/public/css/group_buy.css">

<link rel="stylesheet" type="text/css" href="__TEMP__/{$style}/public/css/slick.css">
<link rel="stylesheet" type="text/css" href="__TEMP__/{$style}/public/css/components.css">


<style type="text/css">
.custom-search-button{top: 1px;}
.sliding {overflow-y: auto;background: #ffffff;}
.sliding::-webkit-scrollbar {display: none;}
.sliding ul {white-space: nowrap;text-align: center;}
.sliding ul li {padding: 10px 10px 0 10px;display: inline-block;background: #ffffff;border-right: 2px solid #f8f8f8;width:25%;}
.sliding ul li img{width:60px;height:60px;}
.members_goodspic{border-bottom:1px solid #f3f3f3;}
.info p.goods-title{padding-top:10px;}
.info p.goods-price{margin:0;margin-bottom:8px;}
.controltype{height:35px;margin:0;width:100%;line-height:32.5px;}
.controltype>.control_l_content{top:0;background: none;}
.info p.goods-price>em{font-size:12px;font-weight:bold;color:#f23030;}
.popup{
	    background: none;
		padding:0;
}
.code{
	
    width: 60%;
    margin: 0 auto;
    background: #fff;
    border-radius: 13px;
}
.controltype>.control_l_content {
    width: 34%;
}
.members_goodspic>ul>li.gooditem>div.info {
     margin-top: 0px; 
}
.com-content{
	min-height:600px;
}
.custom-search-button{top:0;}

</style>

{/block}

{block name="goodsHead"}
<!-- 标识：是否显示顶部关注  0：[隐藏]，1：[显示]-->
{if condition="$is_subscribe == 1"}
<div class="fixed-focus-on">
	<i class="close" onclick="$('.fixed-focus-on').hide();">x</i>
	<div class="foucs-on-block">
		{if condition="$source_img_url != ''"}
		<img class="user-bg" src="__UPLOAD__/{$source_img_url}">
		{else/}
		<img class="user-bg" src="__TEMP__/{$style}/public/images/default/default_shop_avatar.png">
		{/if}
		{if condition="$source_user_name != ''"}
		<p>我是你的好友<span>{$source_user_name}</span>,推荐给您让生意从此做好</p>
		{else/}
		<p>您当前还未关注微信公众账号，请点击关注</p>
		{/if}
		<button id="subscribe">点击关注</button>
	</div>
</div>
{/if}


<!-- 遮罩层 -->
	<div class="shade" style="position:fixed;top:0px;left:0px;width:100%;height:100%;margin-top:0;background: rgba(0, 0, 0, 0.7);z-index: 999;display:none;"><span style="float: right; padding: 15px;font-size: 22px;color: #fff;background: transparent;" id="close">X</span></div>
<!-- 弹出层 --> 
	<div class="popup" style="position:fixed;top: 36%;left: 0px;width: 100%;height: 100%;margin-left:0px;display:none;">
		
		<div class="code">
			<div style="overflow: hidden;">
			   <img src="__ROOT__/{$web_info.web_qrcode}"  style="max-width: 100%;margin-top: 10px;"/>
			   <div style="color:#666; margin-bottom: 10px;">长按二维码关注公众微信</div>
			</div>
		</div>
	</div>



{/block}

{block name="main" }
{include file='wap/default/share'/}

<div class="com-content">

{foreach $custom_template as $k=>$custom_template_v}
	{if condition="$custom_template_v['control_name'] eq 'GoodsSearch'"}
			<!-- 搜索 -->
			{include file='wap/default/customTemplate/controlCustoTemplateSearch'/}
	{elseif condition="$custom_template_v['control_name'] eq 'Carousel'" /}
			<!-- 轮播图 -->
			{include file='wap/default/customTemplate/controlCustoTemplateSlide'/}
	{elseif condition="$custom_template_v['control_name'] eq 'Notice'" /}
			<!-- 公告 -->
			{include file='wap/default/customTemplate/controlCustoTemplateNotice'/}
	{elseif condition="$custom_template_v['control_name'] eq 'GoodsList'" /}
			<!-- 商品列表 -->
			{include file='wap/default/customTemplate/controlCustoTemplateGoodsList'/}
	{elseif condition="$custom_template_v['control_name'] eq 'NavText'" /}
			<!-- 导航条 -->
			{include file='wap/default/customTemplate/controlCustoTemplateNavText'/}
	{elseif condition="$custom_template_v['control_name'] eq 'ImgAd'" /}
			<!-- 图片广告 -->
			{include file='wap/default/customTemplate/controlCustoTemplateImgAd'/}
	{elseif condition="$custom_template_v['control_name'] eq 'AuxiliaryBlank'" /}
			<!-- 辅助空白 -->
			{include file='wap/default/customTemplate/controlCustoTemplateAuxiliaryBlank'/}
	{elseif condition="$custom_template_v['control_name'] eq 'AuxiliaryLine'" /}
			<!-- 辅助线 -->
			{include file='wap/default/customTemplate/controlCustoTemplateAuxiliaryLine'/}
	{elseif condition="$custom_template_v['control_name'] eq 'CustomModule'" /}
			<!-- 自定义模块 -->
			{include file='wap/default/customTemplate/controlCustoTemplateCustomModule'/}
	{elseif condition="$custom_template_v['control_name'] eq 'NavHybrid'" /}
			<!-- 图片导航 -->
			{include file='wap/default/customTemplate/controlCustoTemplateNavHybrid'/}
	{elseif condition="$custom_template_v['control_name'] eq 'Title'" /}
			<!-- 标题 -->
			{include file='wap/default/customTemplate/controlCustoTemplateTitle'/}
	{elseif condition="$custom_template_v['control_name'] eq 'GoodsClassify'" /}
			<!-- 商品分类 -->
			{include file='wap/default/customTemplate/controlCustoTemplateGoodsClassify'/}
	{elseif condition="$custom_template_v['control_name'] eq 'Coupons'" /}
			<!-- 优惠券 -->
			 {if condition="count($coupon_list) gt '0'"} 
			   {include file='wap/default/customTemplate/controlCustoTemplateCoupon'/}
			 {/if} 
	{/if}
{/foreach}	


</div>	
{/block}
 {block name="javascript"}
 <script>
$(function(){
	//关注微信公众号弹出
	$("#subscribe").click(function(){
		
		$(".shade").show();
		$(".popup").show();
	})
	//关注微信公众号关闭
	$("#close").click(function(){
		$(".shade").hide();
		$(".popup").hide();
		
	})
	
	
	$.ajax({
		type:"post",
		url : "{:__URL('APP_MAIN/member/getShareContents')}",
		success : function(data){
			//alert(JSON.stringify(data));
			//document.write(data.share_img);
			/* $("#share_title").val(data['share_title']);
			$("#share_desc").val(data['share_contents']);
			$("#share_url").val(data['share_url']);
			$("#share_img_url").val(data['share_img']);\ */
			{include file='wap/default/shareContents'/}
		}
	})
})
</script>
{/block}